<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
        <script>
            console.log(document.documentElement.clientHeight);     //边框以内的总高度
        console.log(document.documentElement.clientWidth);          //边框以内的总宽度
        </script>
</body>
</html>